package com.entity;

// Generated 09.02.2014 20:16:29 by Hibernate Tools 3.4.0.CR1

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * FieldsEntity generated by hbm2java
 */
@Entity
@Table(name = "fields", catalog = "jiraexcel")
public class FieldsEntity implements java.io.Serializable {

	private Integer idFields;
	private ResolutionEntity resolutionEntity;
	private ProjectEntity projectEntity;
	private WorklogEntity worklogEntity;
	private UserEntity userEntityByIdReporter;
	private PriorityEntity priorityEntity;
	private UserEntity userEntityByIdAuthor;
	private IssueTypeEntity issueTypeEntity;
	private IssueEntity issueEntity;
	private StatusEntity statusEntity;
	private TimetrackingEntity timetrackingEntity;
	private CommentEntity commentEntity;
	private Date resolutionDate;
	private Date duedate;
	private String summary;
	private Long timespent;
	private Date updated;
	private Date created;
	private String description;
	private Set<FixVersionsEntity> fixVersionsEntities = new HashSet<FixVersionsEntity>(0);
	private Set<SubtasksEntity> subtasksEntities = new HashSet<SubtasksEntity>(0);
	private Set<IssueEntity> issueEntities = new HashSet<IssueEntity>(0);
	private Set<AttachmentEntity> attachmentEntities = new HashSet<AttachmentEntity>(0);

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id_fields", unique = true, nullable = false)
	public Integer getIdFields() {
		return this.idFields;
	}

	public void setIdFields(Integer idFields) {
		this.idFields = idFields;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_resolution")
	public ResolutionEntity getResolutionEntity() {
		return this.resolutionEntity;
	}

	public void setResolutionEntity(ResolutionEntity resolutionEntity) {
		this.resolutionEntity = resolutionEntity;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_project")
	public ProjectEntity getProjectEntity() {
		return this.projectEntity;
	}

	public void setProjectEntity(ProjectEntity projectEntity) {
		this.projectEntity = projectEntity;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_worklog")
	public WorklogEntity getWorklogEntity() {
		return this.worklogEntity;
	}

	public void setWorklogEntity(WorklogEntity worklogEntity) {
		this.worklogEntity = worklogEntity;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_reporter")
	public UserEntity getUserEntityByIdReporter() {
		return this.userEntityByIdReporter;
	}

	public void setUserEntityByIdReporter(UserEntity userEntityByIdReporter) {
		this.userEntityByIdReporter = userEntityByIdReporter;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_priority")
	public PriorityEntity getPriorityEntity() {
		return this.priorityEntity;
	}

	public void setPriorityEntity(PriorityEntity priorityEntity) {
		this.priorityEntity = priorityEntity;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_author")
	public UserEntity getUserEntityByIdAuthor() {
		return this.userEntityByIdAuthor;
	}

	public void setUserEntityByIdAuthor(UserEntity userEntityByIdAuthor) {
		this.userEntityByIdAuthor = userEntityByIdAuthor;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_issue_type")
	public IssueTypeEntity getIssueTypeEntity() {
		return this.issueTypeEntity;
	}

	public void setIssueTypeEntity(IssueTypeEntity issueTypeEntity) {
		this.issueTypeEntity = issueTypeEntity;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_parent")
	public IssueEntity getIssueEntity() {
		return this.issueEntity;
	}

	public void setIssueEntity(IssueEntity issueEntity) {
		this.issueEntity = issueEntity;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_status", nullable = false)
	public StatusEntity getStatusEntity() {
		return this.statusEntity;
	}

	public void setStatusEntity(StatusEntity statusEntity) {
		this.statusEntity = statusEntity;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_timetracking")
	public TimetrackingEntity getTimetrackingEntity() {
		return this.timetrackingEntity;
	}

	public void setTimetrackingEntity(TimetrackingEntity timetrackingEntity) {
		this.timetrackingEntity = timetrackingEntity;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_comments")
	public CommentEntity getCommentEntity() {
		return this.commentEntity;
	}

	public void setCommentEntity(CommentEntity commentEntity) {
		this.commentEntity = commentEntity;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "resolutionDate", length = 19)
	public Date getResolutionDate() {
		return this.resolutionDate;
	}

	public void setResolutionDate(Date resolutionDate) {
		this.resolutionDate = resolutionDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "duedate", length = 19)
	public Date getDuedate() {
		return this.duedate;
	}

	public void setDuedate(Date duedate) {
		this.duedate = duedate;
	}

	@Column(name = "summary", length = 1000)
	public String getSummary() {
		return this.summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	@Column(name = "timespent")
	public Long getTimespent() {
		return this.timespent;
	}

	public void setTimespent(final Long timespent) {
		this.timespent = timespent;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "updated", length = 19)
	public Date getUpdated() {
		return this.updated;
	}

	public void setUpdated(Date updated) {
		this.updated = updated;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "created", length = 19)
	public Date getCreated() {
		return this.created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	@Column(name = "description", length = 1000)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "fieldsEntity")
	public Set<FixVersionsEntity> getFixVersionsEntities() {
		return this.fixVersionsEntities;
	}

	public void setFixVersionsEntities(Set<FixVersionsEntity> fixVersionsEntities) {
		this.fixVersionsEntities = fixVersionsEntities;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "fieldsEntity")
	public Set<SubtasksEntity> getSubtasksEntities() {
		return this.subtasksEntities;
	}

	public void setSubtasksEntities(Set<SubtasksEntity> subtasksEntities) {
		this.subtasksEntities = subtasksEntities;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "fieldsEntity")
	public Set<IssueEntity> getIssueEntities() {
		return this.issueEntities;
	}

	public void setIssueEntities(Set<IssueEntity> issueEntities) {
		this.issueEntities = issueEntities;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "fieldsEntity")
	public Set<AttachmentEntity> getAttachmentEntities() {
		return this.attachmentEntities;
	}

	public void setAttachmentEntities(Set<AttachmentEntity> attachmentEntities) {
		this.attachmentEntities = attachmentEntities;
	}

}
